The Accordion Pane Component > FAccordionPane.addItemAt()

 

FAccordionPane.addItemAt()

Availability

Flash Player 6.

Usage

myAccordion_acp.addItemAt (index, label, linkage)

Parameters

index A number indicating the index where the new section should be created.

label A string specifying the label of the new section.

linkage The linkage id of the symbol that will be displayed within the section.

Returns

Nothing

Description

Adds a new section at the specified index, containing the symbol from the linkage id passed in. If the specified index already exists, then the section will be inserted at that index, and any existing sections at or above the index will have 1 added to their index. The content's origin point will not be modified and the content will be attached with the upper left of the content area being the upper left of the content.

Note

none

Example

 

The accordion_example1.fla example file contains an example of using this method.

The following example adds creates an accordion pane with two sections, and the adds another section item to the beginning of an AccordionPane, with label "Calendar". The content for the item is a calendar component from FUI Components set 2.

myAccordionPane_acp.addItem("Section 1");
myAccordionPane_acp.addItem("Section 2");
myAccordionPane_acp.addItemAt(0, "Calendar","FCalendarSymbol");

See also

FAccordionPane.addItem()

FAccordionPane.getItemAt()

FAccordionPane.removeItemAt()

FAccordionPane.replaceItemAt()